package com.example.networklibrary.api;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.networklibrary.ResponseModel;
import com.example.networklibrary.model.GuestModel;
import com.example.networklibrary.model.ProductListModel;
import com.example.networklibrary.model.UserInfo;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;

public interface SyncServerService {
    @POST("zhiyis-auth/rpc.api")
    Observable<ResponseModel<JSONObject>> parseJsonObject(@Query(value = "report", encoded = true) String json);

    @POST
    Observable<ResponseModel<JSONObject>> parseJsonObject(@Url String url, @Query(value = "report", encoded = true) String json);

    @POST
    Observable<ResponseModel<JSONArray>> parseArray(@Url String url, @Query(value = "report", encoded = true) String json);

    @POST
    Observable<ResponseModel<String>> parseString(@Url String url,@Query(value = "report",encoded = true) String json);

    @POST
    Observable<ResponseModel<UserInfo>> login(@Url String url, @Query(value = "report", encoded = true) String requestEntity);

    @POST
    Observable<ResponseModel<GuestModel>> guestLogin(@Url String url, @Query(value = "report", encoded = true) String requestJson);

    @POST
    Observable<ResponseModel<ProductListModel>> loadProduct(@Url String url, @Query(value = "report", encoded = true) String requestJson);


}